{template 'public/header'}
{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/zh_tcwq/template/public/ygcss.css">
<style type="text/css">
      .dizhiname{width: 500px;float: left;}
      .dizhi:hover{color: #ff3b3b}
      .dizhi{
      color: #ff3b3b;
      float: left;
      height: 35px;
      line-height: 35px;
      margin-left: 20px;
      font-weight: bold;

    }
</style>

<ul class="nav nav-tabs">
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div>    
    <li class="active"><a href="javascript:void(0);">商家信息</a></li>
</ul>
<div class="main">
    <form action="" method="post" class="form-horizontal form" enctype="multipart/form-data">
        <!--<input type="hidden" name="parentid" value="{$parent['id']}" />-->
        <div class="panel panel-default ygdefault">
            <div class="panel-heading wyheader">
                商家管理&nbsp;&nbsp;>&nbsp;&nbsp;商家信息
            </div>
            <div class="panel-body">   
            <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">商家排序</label>
                    <div class="col-sm-9">
                        <input type="number" name="num" class="form-control" value="{$info['num']}" />
                        <span class="help-block">*从小到大排序</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">商家名称</label>
                    <div class="col-sm-9">
                        <input type="text" name="store_name" class="form-control" value="{$info['store_name']}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">商家电话</label>
                    <div class="col-sm-9">
                        <input type="text" name="tel" class="form-control" value="{$info['tel']}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">商家地址</label>
                    <div class="col-sm-9">
                        <input type="text" name="address" class="form-control" value="{$info['address']}" />
                    </div>
                </div>
                   <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">地址坐标</label>
                    <div class="col-sm-10">
                     <!-- {php echo tpl_form_field_coordinate('op',$list['coordinates'])} -->
                     <input type="text" name="coordinates" class="form-control dizhiname" value="{$info['coordinates']}" placeholder="地理位置" />
                     <a href="http://lbs.qq.com/tool/getpoint/" target="_blank" class="dizhi">点击获取地理位置</a>
                    </div>
                </div>          
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">商家LOGO</label>
                    <div class="col-sm-9">
                        {php echo tpl_form_field_image('logo', $info['logo'])}

                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">老板微信</label>
                    <div class="col-sm-9">
                        {php echo tpl_form_field_image('weixin_logo', $info['weixin_logo'])}

                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">商家轮播图</label>
                    <div class="col-sm-9">
                       {php echo tpl_form_field_multi_image('ad',$ad);}
                       <span class="help-block">*建议尺寸大小:2:1</span>
                    </div>
                </div>

                              
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">商家图片</label>
                    <div class="col-sm-9">
                       {php echo tpl_form_field_multi_image('img',$img);}
                       <span class="help-block">*建议尺寸大小:2:1</span>
                    </div>
                </div>
                 <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">商家二维码图片</label>
                    <div class="col-sm-9">
                        {php echo tpl_form_field_image('ewm_logo', $info['ewm_logo'])}
                       <span class="help-block">*不上传默认为店铺二维码图片</span>
                    </div>
                </div>   
                                    
                
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">公告</label>
                    <div class="col-sm-9">
                        <input type="text" name="announcement" class="form-control" value="{$info['announcement']}" />
                    </div>
                </div>
                
              <div class="form-group">

                    <label for="inputEmail3" class="col-sm-2 control-label">营业开始时间</label>

                    <div class="col-sm-10">

                   {php echo tpl_form_field_clock('start_time', $info['start_time']);}

                    </div>

                  </div>

                <div class="form-group">

                    <label for="inputEmail3" class="col-sm-2 control-label">营业结束时间</label>

                    <div class="col-sm-10">
                   {php echo tpl_form_field_clock('end_time', $info['end_time']);}

                    </div>

                  </div>

              
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">关键字</label>
                <div class="col-sm-10">
                    <input type="text" name="keyword" value="{$info['keyword']}" class="form-control" id="inputEmail3">
                </div>
            </div>
               <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">人气数</label>
                <div class="col-sm-10">
                    <input type="number" name="views" value="{$info['views']}" class="form-control" id="inputEmail3">
                </div>
            </div>
            
           <div class="form-group">
                    <label for="lastname" class="col-sm-2 control-label">店内设施</label>
                    <div class="col-sm-10">
                        <label class="checkbox-inline">
                        {if $info['skzf']==1}  
                        <input type="checkbox" name="skzf" id="optionsRadios3" value="1" checked> 刷卡支付
                        {else}
                        <input type="checkbox" name="skzf" id="optionsRadios3" value="1" > 刷卡支付
                        {/if}
                        </label>
                        <label class="checkbox-inline">
                            {if $info['wifi']==1}  
                            <input type="checkbox" name="wifi" id="optionsRadios4"  value="1" checked> WIFI
                              {else}
                               <input type="checkbox" name="wifi" id="optionsRadios4"  value="1" > WIFI
                               {/if}
                        </label>
                        <label class="checkbox-inline">
                           {if $info['mftc']==1}  
                            <input type="checkbox" name="mftc" id="optionsRadios4"  value="1" checked> 免费停车
                             {else}
                                <input type="checkbox" name="mftc" id="optionsRadios4"  value="1"> 免费停车
                                 {/if}
                        </label>
                        <label class="checkbox-inline">
                             {if $info['jzxy']==1}  
                                <input type="checkbox" name="jzxy" id="optionsRadios4"  value="1" checked>禁止吸烟
                                {else}
                                <input type="checkbox" name="jzxy" id="optionsRadios4"  value="1" >禁止吸烟
                                 {/if}
                        </label>
                        <label class="checkbox-inline">
                        {if $info['tgbj']==1}  
                            <input type="checkbox" name="tgbj" id="optionsRadios4"  value="1" checked> 提供包间
                             {else}
                            <input type="checkbox" name="tgbj" id="optionsRadios4"  value="1" > 提供包间
                             {/if}
                        </label>
                         <label class="checkbox-inline">
                        {if $info['sfxx']==1}  
                            <input type="checkbox" name="sfxx" id="optionsRadios4"  value="1" checked> 沙发休闲
                             {else}
                            <input type="checkbox" name="sfxx" id="optionsRadios4"  value="1" > 沙发休闲
                             {/if}
                        </label>
                    </div>
                </div>
             <!-- <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">所属区域</label>
                <div class="col-sm-10">
                    <select class="form-control" name="area_id">
                      {loop $area $key $item}
                        {if $item['id']==$info['area_id']}
                        <option value="{$item['id']}" selected="selected">{$item['area_name']}</option>
                        {else}
                        <option value="{$item['id']}" >{$item['area_name']}</option>
                        {/if}
                        {/loop}
                    </select>
                </div>
                         </div> -->
              <!--  <div class="form-group">
                           <label class="col-xs-12 col-sm-3 col-md-2 control-label">所属城市</label>
                           <div class="col-sm-10">
                            <input type="text" name="cityname" value="{$info['cityname']}" class="form-control" id="inputEmail3">
                           </div>
                        </div> -->
             <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">商家简介</label>
                <div class="col-sm-10">
                    <textarea name="details" class="form-control" cols="30" rows="7">{$info['details']}</textarea>
                </div>
            </div>
             <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">VR链接</label>
                <div class="col-sm-10">
                   <input type="text" name="vr_link" value="{$info['vr_link']}" class="form-control" id="inputEmail3">
                     <span style="color:red">此链接需要在小程序后台配置业务域名</span>
                </div>
            </div>

         <!--    <div class="form-group">
             <label class="col-xs-12 col-sm-3 col-md-2 control-label">行业分类</label>
             <div class="col-sm-10">
                 <input type="text"  value="{$type['type_name']}" class="form-control" id="inputEmail3" readonly>
             </div>
         </div> -->
         
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label" style="margin-right: 15px;">行业分类</label>
                    <select class="col-sm-8" name="storetype_id">
                        {loop $type $key $item}
                        {if $item['id']==$info['storetype_id']}
                        <option value="{$item['id']}" selected="selected">{$item['type_name']}</option>
                        {else}
                        <option value="{$item['id']}" >{$item['type_name']}</option>
                        {/if}
                        {/loop}
                    </select>
                </div>
     <!--     {if $info['time_over']==1} 
           <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label" style="margin-right: 15px;">入住类型</label>
                <select class="col-sm-8" name="type">
                    {loop $typein $key $item}
                   
                    {if $item['id']==$info['type']}
                    <option value="{$item['id']}" selected="selected">{if $item['type']==1}一天{elseif $item['type']==2}半年{else $item['type']==3}一年{/if}</option>
                    {else}
                    <option value="{$item['id']}" >{if $item['type']==1}一天{elseif $item['type']==2}半年{elseif $item['type']==3}一年{/if}</option>
                    {/if}
                    {/loop}
                </select>
            </div>
         {/if} -->
              <!-- <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label" style="margin-right: 15px;">入住类型</label>
                   <select class="col-sm-8" name="type">                                                       
                       <option value="1" {if $info['type']==1} selected="selected" {/if}>一周</option>
                        <option value="2" {if $info['type']==2} selected="selected" {/if}>半年</option>
                         <option value="3"{if $info['type']==3} selected="selected" {/if}>一年</option>                       
                    </select>
                </div> -->
                  <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">到期时间</label>
                <div class="col-sm-10">
                   {php echo tpl_form_field_date('dq_time',date('Y-m-d',$info['dq_time']))}
                </div>
            </div>
              {if $img2!=''}
                  <div class="form-group">
                    <label for="inputEmail3" class="col-sm-2 control-label">店铺小程序码</label>
                    {if strlen($img2)>200}
                    {php echo "<img src='data:image/png;base64,".$img2."'>"}
                    {else} 
                    <div class="col-sm-10">
                     <input type="text" style="color:red" name="orderby" value="该二维码必须在小程序发布后才能生成" class="form-control" id="inputEmail3" readonly>
                   </div>
                   {/if}
                 </div>
                 {/if}
                   <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label" style="margin-right: 15px;">绑定微信端管理员</label>
                    <select class="col-sm-4" id="username" name="user_id">
                     <option value="0">请选择管理员</option>
                        {loop $user $key $item}
                        {if $item['id']==$info['user_id']}
                        <option value="{$item['id']}" selected="selected" name="unopction">{$item['name']}</option>
                        {else}
                        <option value="{$item['id']}" name="unopction">{$item['name']}</option>
                        {/if}
                        {/loop}
                    </select>
                   
              </div>
             <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">登入账号</label>
                <div class="col-sm-10">
                    <input type="text"  name="user_name" value="{$info['user_name']}" class="form-control" id="inputEmail3" >
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">登入密码</label>
                <div class="col-sm-10">
                    <input type="text" name="pwd" value="" class="form-control" id="inputEmail3" >
                    <span style="color:red">此账号为手机端登入账号,密码密文不显示,忘记请直接修改</span>
                </div>
            </div>
               <div class="form-group">
               <label class="col-xs-12 col-sm-3 col-md-2 control-label">是否置顶</label>
               <div class="col-sm-9">
                   <label class="radio-inline">
                       <input type="radio" name="is_top" value="1" {if $info['is_top']==1 || empty($info['is_top'])}checked{/if} />是
                   </label>
                   <label class="radio-inline">
                       <input type="radio" name="is_top" value="2" {if $info['is_top']==2}checked{/if} />否
                   </label>
               </div>
           </div>
        

            </div>
        </div>
        <div class="form-group">
            <input type="submit" name="submit" value="修改" class="btn col-lg-3" style="color: white;background-color: #44ABF7;"/>
            <input type="hidden" name="token" value="{$_W['token']}" />
            <input type="hidden" name="id" value="{$info['id']}" />
        </div>
    </form>
</div>
<script type="text/javascript">
    $(function(){
        $("#frame-9").show();
        $("#yframe-9").addClass("wyactive");
    })
</script>